//
//  ViewController.m
//  09-倒影
//
//  Created by J on 16/2/27.
//  Copyright © 2016年 J. All rights reserved.
//

#import "ViewController.h"
#import "CopyVIew.h"

@interface ViewController ()
@property (weak, nonatomic)IBOutlet CopyVIew *replyView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    CATransform3D transform = CATransform3DMakeTranslation(0, _replyView.bounds.size.height, 0);//平移

    transform = CATransform3DRotate(transform, -M_PI,1, 0, 0);//x轴旋转
    CAReplicatorLayer* layer =(CAReplicatorLayer*) _replyView.layer;
    layer.instanceCount = 2;
    layer.instanceTransform = transform;
    
    
//    layer.instanceAlphaOffset = -0.1;

    layer.instanceRedOffset = -0.1;
    layer.instanceGreenOffset = -0.1;
    layer.instanceBlueOffset = -0.1;

    
}


@end
